<template>
	<div>
		<header class="mui-bar mui-bar-nav">
			<a class="mui-icon mui-icon-left-nav mui-pull-left callback-his" @click="goBack()"></a>
			<h1 class="mui-title">保险公司</h1>
		</header>
		<div class="mui-content">
			<ul class="none-maring-top mui-table-view">
				<template v-for="(item,$index) in company_list">
					<li class="mui-table-view-cell mui-media">
						<router-link :to="{path:'/file',query:{id:item.id}}" class="mui-navigate-right">
							<img class="mui-pull-left list-img" src="../../../../static/banner.jpg">
							<div class="mui-media-body company-list">{{item.title}}</div>
						</router-link>
					</li>
				</template>
			</ul>
		</div>
	</div>
</template>
<script>
	import {api} from '../../../gloabl/api.js'
	export default{
		data:function(){
			return{
				company_list:{}
			}
		},
		mounted:function(){
			mui.showLoading("正在加载..","div");//遮罩层
			let me = this;
			let query='{'+api.allInsurCompaniesApi()+'}';
			me.$http.post(url.graphql,{query:query}).then((res)=>{
				mui.hideLoading();
				me.company_list = res.data.data.allInsurCompanies;
			}).catch(function (error) {
				mui.alert('请求超时')
			})
		}
	}
</script>
<style scoped="scoped">
	.list-img{
		width: 60px;
		height: 60px;
		margin-right: 15px;
		line-height: 60px;
	}
	.company-list{
		line-height: 60px;
		text-align: left;
		font-size: 15px;
		font-weight: 600;
	}
</style>